﻿function calcIframeHeight(iFrameID) {
    //find the height of the internal page
    var the_height = document.getElementById(iFrameID).contentWindow.document.body.scrollHeight;

    //change the height of the iframe
    document.getElementById(iFrameID).height = the_height;
}